package cn.edu.lingnan.service;

import cn.edu.lingnan.dao.ScoreDao;
import cn.edu.lingnan.dao.ScoreDaoImp;
import cn.edu.lingnan.pojo.Score;
import cn.edu.lingnan.pojo.ScoreDTO;

import java.util.List;

public class ScoreServiceImp implements ScoreService{
    private ScoreDao scoreDao=new ScoreDaoImp();
    @Override
    public List<ScoreDTO> ScorePageQuery(Integer page, Integer pageSize) {
        return  scoreDao.ScorePageQuery(page, pageSize);
    }

    @Override
    public Integer getTotalScores() {
        return scoreDao.getTotalScores();
    }

    @Override
    public List<ScoreDTO> getScoresByCid(Integer cid) {
        return scoreDao.getScoresByCid(cid);
    }

    @Override
    public List<ScoreDTO> getCoursesBySid(Integer sid) {
        return scoreDao.getCoursesBySid(sid);
    }

    @Override
    public List<ScoreDTO> getScoresBySid(Integer sid) {
        return scoreDao.getScoresBySid(sid);
    }

    @Override
    public List<ScoreDTO> getNoCoursesBySid(Integer sid) {
        return scoreDao.getNoCoursesBySid(sid);
    }

    @Override
    public Integer addScore(Score score) {
        return  scoreDao.addScore(score);
    }

    @Override
    public Integer deleteScore(Integer sid , Integer cid) {
        return scoreDao.deleteScore(sid, cid);
    }

    @Override
    public Integer countScore(Integer sid, Integer cid) {
        return scoreDao.countScore(sid, cid);
    }
}
